package com.ibangnuo.api.system;

import com.ibangnuo.framework.domain.system.SysDictionary;
import com.ibangnuo.framework.model.response.ObjectResult;
import com.ibangnuo.framework.model.response.QueryResponseResult;
import com.ibangnuo.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

import java.util.Map;

/**
 * @Author: wwy
 * @Date: 2019-12-21 10:44
 */
@Api(value="数据字典管理",description = "数据字典，提供数据模型的增删改查")
public interface SysDictionaryControllerApi {

    @ApiOperation("查询全部数据")
    QueryResponseResult findAll();

    @ApiOperation("保存数据")
    ResponseResult add(SysDictionary sysDictionary);

    @ApiOperation("根据id查找")
    @ApiImplicitParams({
            @ApiImplicitParam(name="id",value = "数据字典id",required=true,paramType="path",dataType="String"),
    })
    ObjectResult<Map> findById(String id);
    @ApiOperation("根据id删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name="id",value = "数据字典id",required=true,paramType="path",dataType="String"),
    })
    ResponseResult delete(String id);
    @ApiOperation("根据id更新")
    @ApiImplicitParams({
            @ApiImplicitParam(name="id",value = "数据字典id",required=true,paramType="path",dataType="String"),
    })
    ResponseResult update(String id, SysDictionary sysDictionary);

    @ApiOperation("根据type查找")
    @ApiImplicitParams({
            @ApiImplicitParam(name="type",value = "数据字典type",required=true,paramType="path",dataType="String"),
    })
    ObjectResult<Map> findByType(String type);
}
